import server from '../../utils/fetch'
export const getAddress = () => {
    return server.get('/v1/address', {
        params: {
            userid: localStorage.getItem('patient_id')
        }
    })
}

export const getAddressItem = (id) => {
    return server.get('/v1/address/' + id)
}

export const updateAddress = ({ _id, ...data }) => {
    return server.put('/v1/address/' + _id, { ...data })
}

export const delAddress = (id) => {
    return server.delete('/v1/address/' + id)
}

export const addAddress = (data) => {
    return server.post('/v1/address', { ...data })
}
